package com.zt.order.service;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.zt.order.mapper.OrderMapper;
import com.zt.order.pojo.Order;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class OrderService {

    @Resource
    private OrderMapper orderMapper;

    public Order queryOrderById(Long orderId) {
        // 1.查询订单
        Order order = orderMapper.findById(orderId);
        // 4.返回
        return order;
    }
    @SentinelResource("goods")
    public void queryGoods(){
        System.err.println("查询商品");
    }
}
